#!/bin/bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"

REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "${REPO_ROOT}"

export TZ=UTC

START_DATE="$1"
END_DATE="$2"

echo "$@"

source /remote/iosg/home/bot-coin/miniconda3/etc/profile.d/conda.sh
conda activate /remote/iosg/home/bot-coin/miniconda3/envs/coin_env
cd python

# This is important to specify to use flow.

./pyrunner coin/support/feed_tool/feed_stats/app/coin2_feed_stats_checker.py \
  --db_config=/remote/iosg/data/etc/general_operations/deploy/bot-hft/hft.feed_stats/coin_deploy/research_feed_stats/db_config/coin2_db_config_prod.json \
  --start_date=${START_DATE} \
  --end_date=${END_DATE} "$@"

conda deactivate
